InformIT - Your Online Guide to Tech Reference

Log OutShopping CartView Cart

HomeArticlesBook StoreOnline BooksAuthorsMyInformIT
Home > Articles > Web Development > More Topics... > .NET >

Save

 

Discuss

   

E-mail

Working With ADO.NET Transactions
OCT 25, 2002 By Jason Lefebvre. Article is provided courtesy of Sams.

Contents
1Hour 18: Working with Transactions
2Transactions and ADO.NET
3Transactions with Stored Procedures
4Summary
5Q&A
6Workshop
See Also

This sample chapter is from Sams Teach Yourself ADO.NET in 24 Hours.

Also By This Author
Using the ADO.NET's Built-In ASP.NET List Controls
Binding Data to List Controls with ADO.NET
Using ADO.NET's DataReader and DataAdapter
more…
Related Articles
Connected Operations in ADO.NET
Binding Data to List Controls with ADO.NET
Disconnected Operations Part I: DataSet and DataAdapter
more…
Related Books
Visual Basic® .NET Developer's Guide to ASP .NET, XML and ADO.NET
Database Programming with Visual Basic .NET and ADO.NET: Tips, Tutorials, and Code
more…

 

Advertise With Us

Q&A

  1. Can I enlist multiple command operations in the same transaction?

  1. Certainly! All you need to do is create another Command object and assign it the same Connection object. Then remember to assign the SqlTransaction object to it as well.

  1. What happens to my transaction if the server crashes while it is processing?

  1. This is dependent upon your data source. However, using Microsoft SQL Server 7.0 or 2000, all changes made during the life of your transaction will be rolled back. Almost any transactional data source should operate in the same manner.

  1. What if I do not explicitly call the Commit() method to save the transaction?

  1. If you do not call the Commit() method, the database changes made during the life of the transaction will not be saved.

  1. Are changes to database schema performed while in a transaction rolled back as well?

  1. Yes. If you were to create a table while participating in a transaction, and then decided to roll the transaction back, the table would be rolled back as well.


   
Next Section
6. Workshop
Rate This Article
 
How would you rate this article?    

Most Active Comments
 
CommentAuthorRepliesPosted

 Spanning a TRX in varios method calls (may be connections)

peix

0OCT 29, 2002 07:07:04 AM
See All Comments 
 
Make a New Comment

Subject:

Username:


    Change Username

Message: